package ${package.Service};

import ${package.Entity}.${entity};
import ${superServiceClassPackage};
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;

import java.util.List;

/**
 * ${table.comment!} 服务类
 *
 * @author ${author}
 * @since ${date}
 */
<#assign keyPropertyType="">
<#list table.fields as field>
    <#if field.keyFlag>
        <#assign keyPropertyType="${field.propertyType}">
    </#if>
</#list>
<#if kotlin>
interface ${table.serviceName} : ${superServiceClass}<${entity}>
<#else>
public interface ${table.serviceName} extends ${superServiceClass}<${entity}> {

    /**
     * 分页列表
     *
     * @param ${entity?uncap_first}
     * @return
     */
    IPage<${entity}> pageList(Page page, ${entity} ${entity?uncap_first});

    /**
     * 列表查询
     *
     * @param ${entity?uncap_first}
     * @return
     */
    List<${entity}> listByEntity(${entity} ${entity?uncap_first});

    /**
     * 详情
     *
     * @param id
     * @return
     */
    ${entity} selectById(${keyPropertyType} id);

    /**
     * 保存
     *
     * @param ${entity?uncap_first}
     * @return
     */
    Boolean save${entity}(${entity} ${entity?uncap_first});

    /**
     * 修改
     *
     * @param ${entity?uncap_first}
     * @return
     */
    Boolean modify(${entity} ${entity?uncap_first});

    /**
     * 删除
     *
     * @param id
     * @return
     */
    Boolean deleteById(${keyPropertyType} id);
}
</#if>
